package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.filestorage.entity.MxpioFileInfo;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;


/**
 * 设备档案对象 MB_ERP_EQUIPMENT_EQP_ATTR
 *
 * @author Cheng
 * @date 2023-07-01
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_ATTR")
@Schema(description="设备档案")
public class EquipmentAttr extends BaseEntity {

private static final long serialVersionUID=1L;

    @Id
    @Generator(policy = UUIDPolicy.class)
    @Column(name = "ID_")
    @Schema(description = "主键")
    private String id;

    @Column(name = "EQP_CODE_")
    @Schema(description = "设备编码")
    private String eqpCode;

    @Column(name = "ATTR_NAME_")
    @Schema(description = "档案名称")
    private String attrName;

    @Column(name = "ATTR_TYPE_")
    @Schema(description = "档案类型")
    @Dict(dicCode = "ERP_EQUIPMENT_ATTR_TYPE")
    private Integer attrType;

    @Column(name = "ATTR_URL_")
    @Schema(description = "附件")
    @Dict(dicCode = "fileNo", dicEntity = MxpioFileInfo.class, dicText = "fileName")
    private String attrUrl;

    @Column(name = "IS_DEL_")
    @Schema(description = "是否删除（0-正常；1删除）")
    private Integer isDel;


}
